<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改文件解析')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-analysis-edit" th:object="${businessAnalysis}">
            <input name="analysisId" th:field="*{analysisId}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">解析类型：</label>
                    <div class="col-sm-8">
                        <select name="analysisType" class="form-control" th:with="type=${@dict.getType('analysis_type')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{analysisType}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">业务类型：</label>
                    <div class="col-sm-8">
                        <input name="fileCatagory" th:field="*{fileCatagory}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">解析分类：</label>
                    <div class="col-sm-8">
                        <select name="analysisCatagory" class="form-control" th:with="type=${@dict.getType('analysis_category')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{analysisCatagory}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">源文件名称：</label>
                    <div class="col-sm-8">
                        <input name="sourceFileName" th:field="*{sourceFileName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">源文件路径：</label>
                    <div class="col-sm-8">
                        <input name="sourceFilePath" th:field="*{sourceFilePath}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">解析文件名称：</label>
                    <div class="col-sm-8">
                        <input name="targetFileName" th:field="*{targetFileName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">解析文件路径：</label>
                    <div class="col-sm-8">
                        <input name="targetFilePath" th:field="*{targetFilePath}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">解析话术：</label>
                    <div class="col-sm-8">
                        <textarea name="analysis" class="form-control">[[*{analysis}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">中文解析：</label>
                    <div class="col-sm-8">
                        <textarea name="zhAnalysis" class="form-control">[[*{zhAnalysis}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">英文解析：</label>
                    <div class="col-sm-8">
                        <textarea name="enAnalysis" class="form-control">[[*{enAnalysis}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">输入tokens：</label>
                    <div class="col-sm-8">
                        <input name="inputTokens" th:field="*{inputTokens}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">输出tokens：</label>
                    <div class="col-sm-8">
                        <input name="outputTokens" th:field="*{outputTokens}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">总tokens：</label>
                    <div class="col-sm-8">
                        <input name="totalTokens" th:field="*{totalTokens}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">翻译状态：</label>
                    <div class="col-sm-8">
                        <div class="radio-box" th:each="dict : ${@dict.getType('sys_common_status')}">
                            <input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:field="*{status}">
                            <label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">备注：</label>
                    <div class="col-sm-8">
                        <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/analysis";
        $("#form-analysis-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-analysis-edit').serialize());
            }
        }
    </script>
</body>
</html>